package com.winshare.saleAssistant.mapper;

import com.winshare.saleAssistant.domain.dto.req.BaseIdDTO;
import com.winshare.saleAssistant.domain.dto.req.CaseCreateDTO;
import com.winshare.saleAssistant.domain.dto.req.CaseQueryDTO;
import com.winshare.saleAssistant.domain.dto.req.CaseReplyDTO;
import com.winshare.saleAssistant.domain.dto.resp.CaseResponseDTO;
import com.winshare.saleAssistant.domain.entity.CaseDO;
import com.winshare.saleAssistant.domain.query.CaseQuery;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface CaseMapStruct {

    CaseMapStruct INSTANCE = Mappers.getMapper(CaseMapStruct.class);

    CaseDO fromCaseCreateDTO(CaseCreateDTO caseCreateDTO);

    CaseDO fromCaseReplyDTO(CaseReplyDTO caseReplyDTO);

    CaseQuery fromCaseQueryDTO(CaseQueryDTO caseQueryDTO);

    List<CaseResponseDTO> fromCaseDOList(List<CaseDO> caseDOList);

    CaseDO fromBaseIdDTO(BaseIdDTO baseIdDTO);

    CaseResponseDTO fromArticleDO(CaseDO caseDOInSql);
}
